package com.hnhy.hnhyscms_ws.service.impl;

import com.hnhy.hnhyscms_ws.dao.IUsersDao;
import com.hnhy.hnhyscms_ws.entity.Users;
import com.hnhy.hnhyscms_ws.service.IUsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UsersService implements IUsersService {
@Autowired
    private IUsersDao iUsersDao;

    @Override
    public Users getByIdAndName(String username, String password) {
        return iUsersDao.getByIdAndName(username,password);
    }

    @Override
    public List<Users> getAllUsers() {
        return iUsersDao.getAllUsers();
    }

    @Override
    public void change(Users users) {
        iUsersDao.change(users);
    }

    @Override
    public void delete(String username) {
        iUsersDao.delete(username);
    }

    @Override
    public void addUser(Users users) {
        iUsersDao.addUser(users);
    }
}
